<template>
  <div class="footer">
    <ul>
      <li>
        <router-link to="/home">
          <i class="iconfont icon-home"></i>
          <p>首页</p>
        </router-link>
      </li>
      <li>
        <router-link to="/category">
          <i class="iconfont icon-app"></i>
          <p>分类</p>
        </router-link>
      </li>
      <li>
        <router-link to="/cart">
          <i class="iconfont icon-cart"></i>
          <p>购物车</p>
        </router-link>
      </li>
      <li>
        <router-link to="/my">
          <i class="iconfont icon-my"></i>
          <p>我的</p>
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "compNav",
};
</script>
<style lang="scss" scoped>
.footer {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  height: 50px;
  border-top: 1px solid #ccc;
  padding:5px 0;
  background-color: #fff;
  ul {
    width: 100%;
    height: 50px;
    text-align: center;
    display: flex;
    padding-top: 5px;
    li {
      flex-basis: 25%;
      a {
        display: block;
        color: #000;
        height: 100%;
        i {
            display: block;
            margin-bottom: 5px;
            font-size: 25px;
        }
        p {
          font-size: 12px;
          margin: 0;
        }
      }
      .active{
          color: #9926f7;
      }
    }
  }
}
</style>